//
//  YSHomeCardImageCell.m
//  Yueshi
//
//  Created by yueshi_tech on 15/7/17.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "YSHomeCardImageCell.h"
#import "YSCardImageItemView.h"
@interface YSHomeCardImageCell()

@property (nonatomic,strong)YSCardImageItemView *cardItemView;

@end

@implementation YSHomeCardImageCell

+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"YSHomeCardImageCell";
    YSHomeCardImageCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[YSHomeCardImageCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    return cell;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        YSCardImageItemView *cardItemView =  [[YSCardImageItemView alloc]init];
        self.cardItemView = cardItemView;
        [self addSubview:cardItemView];
    }
    return self;
}

-(void)setCardImageFrame:(YSCardImageItemFrame *)cardImageFrame{
    _cardImageFrame = cardImageFrame;
    _cardItemView.cardImageFrame = cardImageFrame;
}

@end
